package com.abvnet.project.water.project.service;

import com.abvnet.project.water.project.domain.ProjectFlowParam;
import com.abvnet.project.water.project.mapper.ProjectFlowParamMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 项目流程单元参数 服务层实现
 * 
 * @author wolf
 * @date 2019-10-22
 */
@Service
public class ProjectFlowParamServiceImpl implements IProjectFlowParamService {
	@Autowired
	private ProjectFlowParamMapper projectFlowParamMapper;

	/**
	 * 查询项目流程单元参数
	 *
	 * @param projectId 项目ID
	 * @return 流程单元参数
	 */
	@Override
	public List<ProjectFlowParam> selectProjectFlowParamByProjectId(Long projectId) {
		return projectFlowParamMapper.selectProjectFlowParamByProjectId(projectId);
	}

	/**
	 * 查询项目流程单元参数
	 *
	 * @param projectFlowParam 流程单元参数
	 * @return 流程单元参数
	 */
	public ProjectFlowParam selectProjectFlowParam(ProjectFlowParam projectFlowParam) {
		return projectFlowParamMapper.selectProjectFlowParam(projectFlowParam);
	}

	/**
	 * 新增项目流程单元参数
	 *
	 * @param projectFlowParam 项目流程单元参数
	 * @return 结果
	 */
	@Override
	public int insertProjectFlowParam(ProjectFlowParam projectFlowParam) {
		return projectFlowParamMapper.insertProjectFlowParam(projectFlowParam);
	}

	/**
	 * 修改项目流程单元参数
	 *
	 * @param projectFlowParam 项目流程单元参数
	 * @return 结果
	 */
	@Override
	public int updateProjectFlowParam(ProjectFlowParam projectFlowParam) {
		return projectFlowParamMapper.updateProjectFlowParam(projectFlowParam);
	}
}